<style lang="css" scoped></style>
<template>
  <RouterLink to="/login">TO LOGIN</RouterLink>
  |
  <RouterLink to="/home">TO HOME</RouterLink>
  <hr>
  <button @click="toView('login')">TO LOGIN</button>
  <button @click="toView('home')">TO HOME</button>
  <RouterView></RouterView>


</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter();

const toView = (target: string) => {
  if (target === 'login') {
    router.push("/login")
  }
  if (target === 'home') {
    router.push("/home")
  }
}

</script>